//
// Created by dwx on 2024/4/16.
//

#ifndef MAINBOARD_MAVLINK_CRC_H
#define MAINBOARD_MAVLINK_CRC_H

/*---------------------------- C Scope ---------------------------*/
#ifdef __cplusplus
extern "C" {
#endif

#include "main.h"


#define Type_206_CRC 72
#define Type_207_CRC 165
#define Type_208_CRC 206

#ifndef MAVLINK_MESSAGE_CRCS
/*
 * 1-16
 * 17-32
 * 33-48
 * 49-64
 * 65-80
 * 81-96
 * 97-112
 * 113-128
 * 129-144
 * 145-160
 * 161-176
 * 177-192
 * 193-208
 * 209-224
 * 225-240
 * 241-256
 * */
#define MAVLINK_MESSAGE_CRCS { \
0x32,0x7C,0x89,0x00,0xED,0xD9,0x68,0x77,0x75,0x00,0x00,0x59,0x00,0x00,0x00,0x00, \
0x00,0x00,0x00,0x89,0xD6,0x9F,0xDC,0xA8,0x18,0x17,0xAA,0x90,0x43,0x73,0x27,0xF6, \
0xB9,0x68,0xED,0xF4,0xDE,0xD4,0x09,0xFE,0xE6,0x1C,0x1C,0x84,0xDD,0xE8,0x0B,0x99, \
0x29,0x27,0x4E,0xC4,0x84,0x00,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0xA7,0xB7,0x77, \
0xBF,0x76,0x94,0x15,0x00,0xF3,0x7C,0x00,0x00,0x26,0x14,0x9E,0x98,0x8F,0x00,0x00, \
0x0E,0x6A,0x31,0x16,0x8F,0x8C,0x05,0x96,0x00,0xE7,0xB7,0x3F,0x36,0x2F,0x00,0x00, \
0x00,0x00,0x00,0x00,0xAF,0x66,0x9E,0xD0,0x38,0x5D,0x8A,0x6C,0x20,0xB9,0x54,0x22, \
0xAE,0x7C,0xED,0x04,0x4C,0x80,0x38,0x74,0x86,0xED,0xCB,0xFA,0x57,0xCB,0xDC,0x19, \
0xE2,0x2E,0x1D,0xDF,0x55,0x06,0xE5,0xCB,0x01,0xC3,0x6D,0xA8,0xB5,0x2F,0x48,0x83, \
0x7F,0x00,0x67,0x9A,0xB2,0xC8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \
0x00,0x00,0xBD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \
0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0xa5,Type_206_CRC,Type_207_CRC, \
Type_208_CRC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, \
0x00,0xD0,0x00,0x00,0x00,0x00,0xA3,0x69,0x97,0x23,0x96,0xB3,0x00,0x00,0x00,0x00, \
0x00,0x5A,0x68,0x55,0x5F,0x82,0xB8,0x51,0x08,0xCC,0x31,0xAA,0x2C,0x53,0x2E,0x00}
#endif
uint16_t  generate_vector(uint8_t* buffer, int length, uint8_t msgid);

#ifdef __cplusplus
}
#endif
#endif //MAINBOARD_MAVLINK_CRC_H
